/* This source file is part of the Delectable Engine.
 * For the latest info, please visit http://delectable.googlecode.com/
 *
 * Copyright (c) 2009-2010 Ryan Chew
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file GameWindowSettings.h
 * @brief Application window settings structure.
 */

#ifndef __DBL_GAMEWINDOWSETTINGS_H_
#define __DBL_GAMEWINDOWSETTINGS_H_

// Delectable Headers //
#include "dbl/Delectable.h"

namespace dbl
{
#if CBL_PLATFORM == CBL_PLATFORM_WIN32
	// Windows defines a void* handle (HWND)
	typedef void *		GameWindowHandle;
#endif

	//! Game window styles.
	//! Use bitwise OR to combine options.
	namespace GameWindowStyle
	{
		enum Options
		{
			None       = 0,      //!< No border / title bar (this flag and all others are mutually exclusive)
			Resizable  = 1 << 0, //!< Resizable window
			Close      = 1 << 1, //!< Titlebar + close button
			Fullscreen = 1 << 2  //!< Fullscreen mode (this flag and all others are mutually exclusive)
		};
	}

	//! Game window dimensions.
	struct GameWindowSize
	{
		//! Constructor.
		//! @param	width		Window width.
		//! @param	height		Window height.
		//! @param	bpp			Window bits per pixel.
		GameWindowSize( cbl::Uint32 width, cbl::Uint32 height, cbl::Uint16 bpp = 16 )
			: Width( width ), Height( height ), BitsPerPixel( bpp ) {}

		cbl::Uint32	Width;			//!< Window width.
		cbl::Uint32	Height;			//!< Window height.
		cbl::Uint16	BitsPerPixel;	//!< Window bits per pixel.
	};

	//! Game window settings structure.
	struct GameWindowSettings
	{
		//! Constructor.
		//! @param	title		Window title.
		//! @param	width		Window width.
		//! @param	height		Window height.
		//! @param	bpp			Window bits per pixel.
		//! @param	style		Window style.
		GameWindowSettings( const cbl::Char * const title = "Delectable Window",
			cbl::Uint32 width = 1024, cbl::Uint32 height = 768,
			cbl::Uint16 bpp = 16,
			cbl::Uint32 style = GameWindowStyle::Close )
			: Title( title ),
			Dimensions( width, height, bpp ),
			Style( style ) {}

		cbl::String			Title;			//!< Window title.
		cbl::Uint32			Style;			//!< Window style.
		GameWindowSize		Dimensions;		//!< Window dimensions.
	};
}

#endif // __DBL_GAMEWINDOWSETTINGS_H_
